<%@ page import="com.dzxcqmxm.Dao.PhotoDao" %>
<%@ page import="com.dzxcqmxm.Dao.impl.PhotoDaoImpl" %>
<%@ page import="com.dzxcqmxm.JB.Photo" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: Payboi
  Date: 2022/6/2
  Time: 18:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>相册分类</title>
    <style>
        body{ background:#E0FFFF}
        img{
            width: 100px;
            height: 100px;
        }
        .album{
            float:left;
            width: 102px;
            /*设置文本居中就对了！！*/
            text-align:center;
        }

    </style>
</head>
<body>
<h1>这是审核页面</h1>
<div class="l">
    <form action="/dzxc/delPhotoServlet1" method="post">
        删除用户不符合要求的照片：<input type="text" name="PhotoName"/>
        <input type="submit" value="删除"/>
    </form>
</div>

<p>-------------------------------------------------------------------------------------------------------</p>
<%--准备展示所有用户照片--%>
<%

    PhotoDao photoDao = new PhotoDaoImpl();

    ArrayList<Photo> photoArrayList = new ArrayList<Photo>();

    try {
        photoArrayList = photoDao.findAllphoto();
        System.out.println("审核页面的photoArrayList："+photoArrayList);
    } catch (Exception e) {
        e.printStackTrace();
    }
    if(photoArrayList!=null&&photoArrayList.size()>0){
        for(Photo photo:photoArrayList){
            request.setAttribute("PhotoUrl",photo.getPhotoUrl());
%>
<div class="album">
    <img src=/${PhotoUrl}>
    <p><%     out.println("<tr><td>"+photo.getPhotoName()+"</td>");          %></p>
</div>


<%
        }
    }

%>


</body>
</html>
